<?php //install step 1- Database Details
define('DB_DNC', true); // do not connect to PDO DB
require_once('../inc/inc.common.php');

$tmpl 		= new mvTemplate();

// assign default values
$default_dbuser 	= mvSettings::get('db_user', 'root');
$default_dbpassword = mvSettings::get('db_password', '');
$default_dbhost 	= mvSettings::get('db_host', 'localhost');
$default_dbname 	= mvSettings::get('db_name', 'pomby');
$default_dbmaxrec 	= mvSettings::get('db_max_rec', '10');

// unless we've come from somewhere else
if(isset($_POST['submit'])){
	$default_dbuser 	= $_POST['install_dbuser'];
	$default_dbpassword = $_POST['install_dbpassword'];
	$default_dbhost 	= $_POST['install_dbhost'];
	$default_dbname 	= $_POST['install_dbname'];
	$default_dbmaxrec 	= $_POST['install_dbmaxrec'];
}

$tmpl->assign('default_dbuser'		, $default_dbuser);
$tmpl->assign('default_dbpassword'	, $default_dbpassword);
$tmpl->assign('default_dbhost'		, $default_dbhost);
$tmpl->assign('default_dbname'		, $default_dbname);
$tmpl->assign('default_dbmaxrec'	, $default_dbmaxrec);

$tmpl->page_install('install_step1.tpl');
?>